package edu.ar.bases.dvdstore.domainmodel.repositories;

import java.util.Collection;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import edu.ar.bases.dvdstore.domainmodel.entities.Cliente;
import edu.ar.bases.dvdstore.domainmodel.repositories.interfaces.IClienteRepository;
public class ClienteRepository extends HibernateDaoSupport implements IClienteRepository {

	public ClienteRepository() {
		super();
	}

	
	public Collection<Cliente> findAll()
	{
		return this.getHibernateTemplate().loadAll(Cliente.class);
	}


	public void save(Cliente entity)
	{
		this.getHibernateTemplate().save(entity);
	}
	
	
	
	public Cliente findById(Integer clienteID)
	{
		return (Cliente)this.getHibernateTemplate().get(Cliente.class, clienteID);
	}
	
}
